home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000009_bounce-amos-li…net@onelist.com_Tue Sep 1 10:46:43 1998.msg < prev    next >
Text File  |  1998-10-01  |  4KB  |  118 lines

  1. >From bounce-amos-list--862-mcox=access.digex.net@onelist.com  Tue Sep  1 10:46:43 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.135.229])
  3.     by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id KAA15094
  4.     for <mcox@access.digex.net>; Tue, 1 Sep 1998 10:46:43 -0400 (EDT)
  5. Received: (qmail 18575 invoked by alias); 1 Sep 1998 14:44:43 -0000
  6. Received: (qmail 18546 invoked from network); 1 Sep 1998 14:44:38 -0000
  7. Received: from unknown (HELO godzilla.flashback.net) (193.219.224.230) by pop.onelist.com with SMTP; 1 Sep 1998 14:44:38 -0000
  8. Received: from flashback.net (grok@ppp4.flashback.net [193.220.72.4]) by godzilla.flashback.net (8.8.7/8.8.7) with SMTP id QAA07049 for <amos-list@onelist.com>; Tue, 1 Sep 1998 16:49:38 GMT
  9. From: Hakan Venderlof <grok@flashback.net>
  10. To: amoslist <amos-list@onelist.com>
  11. Date: Tue, 01 Sep 1998 15:17:52 -0500
  12. Message-ID: <yam7548.2605.4255144@mail.flashback.net>
  13. X-Mailer: YAM 1.3.4 [020] - Amiga Mailer by Marcel Beck
  14. Organization: <grok>
  15. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  16. Delivered-To: mailing list amos-list@onelist.com
  17. Precedence: bulk
  18. Reply-to: amos-list@onelist.com
  19. Mime-Version: 1.0
  20. Content-Type: text/plain
  21. Subject: [amos-list] more snow
  22. Status: O
  23. X-Status: 
  24.  
  25. From: Hakan Venderlof <grok@flashback.net>
  26.  
  27. Rem Orginal from: "Garfield Benjamin" <gbenjam@sosbbs.com>  (thanx)
  28.  
  29. Rem Hello. I'm trying to get this snowfall to work...
  30.  
  31. Rem AMOS says Array not dimensioned >>> Plot SNOWXPOS(REP),SNOWYPOS(REP),0 
  32. Rem Might be more errors...
  33.  
  34. Rem Maybe some of you brainy guys could help me more with this one too...
  35.  
  36.  
  37.    NUMFLKS=99
  38.    Dim SNOWXPOS(NUMFLKS),SNOWYPOS(NUMFLKS)
  39.    Dim SNOWYSPD(NUMFLKS)
  40.  
  41.    Rem  Define procedures...
  42.  
  43.    Procedure CLEAR_SNOW
  44.       For REP=0 To NUMFLKS
  45.          Rem where 0=Background 
  46.          Plot SNOWXPOS(REP),SNOWYPOS(REP),0
  47.       Next REP
  48.    End Proc
  49.  
  50.  
  51.   Rem  Initialize the snow...
  52.  
  53.    For REP=0 To NUMFLKS
  54.       SNOWXPOS(REP)=Rnd(352)
  55.       SNOWYSPD(REP)=-(REP*3) : Rem  Note the - sign 
  56.    Next REP
  57.    Rem  Create two screens... REAL is buffered, COL is not... 
  58.    REALSCRN=0 : _COLSCRN=1
  59.    Screen Open REALSCRN,320,240,64,Lowres
  60.    Double Buffer : Autoback 0 : Bob Update Off 
  61.    Screen Open _COLSCRN,320,240,64,Lowres
  62.    Autoback 0 : Bob Update Off : Screen Hide _COLSCRN
  63.    Rem  Initialize the screen palettes and load the IFF picture into
  64.    Rem  REALSCRN.  Draw all static images into REALSCRN then... 
  65.    Screen Copy Logic(REALSCRN) To Physic(_COLSCRN)
  66.  
  67.    Rem  Finally we are ready for the action 
  68.  
  69.    ALL_DONE=False
  70.    Timer=0
  71.    Repeat 
  72.       CLEAR_SNOW
  73.       _UPDATESNOW
  74.  
  75.     If Fire(0) Then ALL_DONE=True
  76.       If Timer>1200 Then ALL_DONE=True
  77.       Screen Swap REALSCRN : Wait Vbl 
  78.    Until ALL_DONE
  79.    Fade 5 : Wait 75
  80.    End 
  81.  
  82.    Procedure _UPDATESNOW
  83.       Shared REALSCRN,_COLSCRN
  84.       For REP=0 To NUMFLKS
  85.          XSPD=Rnd(4)-2 : YSPD=Rnd(4)+1
  86.          TESTXPOS=SNOWXPOS(REP)+XSPD
  87.          TESTYPOS=SNOWYPOS(REP)+YSPD
  88.          Rem  We have the new position, now check for collision...
  89.          Screen ColSCRN
  90.          TEST=Point(TESTXPOS,TESTYPOS)
  91.          Screen REALSCRN
  92.          If(TEST<>0) : Rem where 0=Background color 
  93.             Rem  Ahh, the snow has landed!!
  94.             Plot SNOWXPOS(REP),SNOWYPOS(REP),SNOWCOLOR
  95.             Rem  So, we reset this snowflake...
  96.             SNOWXPOS(REP)=Rnd(352)
  97.             SNOWYPOS(REP)=0
  98.          Else 
  99.             SNOWXPOS(REP)=TESTXPOS
  100.             SNOWYPOS(REP)=TESTYPOS
  101.             Rem  SNOWCOLOR is the color register you're using for the
  102.             Rem  snow.  In my demo, I used YSPD and had a range of 
  103.             Rem  colors from white to a bluish grey.  This makes a very
  104.             Rem  nice effect when the snow builds up.
  105.             Plot SNOWXPOS(REP),SNOWYPOS(REP),SNOWCOLOR
  106.          End If 
  107.       Next REP
  108.    End Proc
  109.  
  110.  
  111. greets  grok@flashback.net  sweden
  112.  
  113.  
  114. ------------------------------------------------------------------------
  115. To unsubscribe from this mailing list, or to change your subscription
  116. to digest, go to the ONElist web site, at http://www.onelist.com and
  117. select the User Center link from the menu bar on the left.